const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
  entry: {
    index: ['./src/js/index.js', './src/scss/index.scss'],
    about: ['./src/js/about.js', './src/scss/about.scss'],
	product: ['./src/js/product.js', './src/scss/product.scss'],
	space: ['./src/js/space.js', './src/scss/space.scss'],
	productdetail: ['./src/js/productdetail.js', './src/scss/productdetail.scss'],
	spacedetail: ['./src/js/spacedetail.js', './src/scss/spacedetail.scss'],
	event: ['./src/js/event.js', './src/scss/event.scss'],
	contact: ['./src/js/contact.js', './src/scss/contact.scss'],
	user: ['./src/js/user.js', './src/scss/user.scss'],
	news: ['./src/js/news.js', './src/scss/news.scss'],
	newsDetail: ['./src/js/newsDetail.js', './src/scss/newsDetail.scss'],
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: "./src/html/index.html",
      filename: "index.html",
      chunks: ["index"]
    }),
	new HtmlWebpackPlugin({
	  template: "./src/html/about.html",
	  filename: "about.html",
	  chunks: ["about"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/product.html",
	  filename: "product.html",
	  chunks: ["product"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/space.html",
	  filename: "space.html",
	  chunks: ["space"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/productdetail.html",
	  filename: "productdetail.html",
	  chunks: ["productdetail"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/spacedetail.html",
	  filename: "spacedetail.html",
	  chunks: ["spacedetail"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/event.html",
	  filename: "event.html",
	  chunks: ["event"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/contact.html",
	  filename: "contact.html",
	  chunks: ["contact"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/user.html",
	  filename: "user.html",
	  chunks: ["user"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/news.html",
	  filename: "news.html",
	  chunks: ["news"]
	}),
	new HtmlWebpackPlugin({
	  template: "./src/html/newsDetail.html",
	  filename: "newsDetail.html",
	  chunks: ["newsDetail"]
	}),
  ]
}
